package com.youlu.campus.entity.order.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.kuaidi100.sdk.response.SubscribePushData;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Transient;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Getter
@Setter
public class LogisticsOrderQueryDto implements Serializable {
    private String id;
    /**
     * 定义版本
     */
    private String version = "v1";
    private String name;
    private String mobile;
    private String activityId;
    private String orderNo;
    private String province;
    private String city;
    private String area;
    private String address;
    private String status;
    private String tips;
    private Date shippingTime;
    private String itemName;
    private String itemImageUrl;
    private Integer price;
    private Integer num;
    private Integer totalFee;
    private String category;
    private String caPrintName;
    private String universityName;
    /**
     * 邮费提示语
     */
    private String expressFeeTips;
    /**
     * 邮费
     */
    private Integer expressFee;
    @JsonIgnore
    private List<LogisticsSubOrderQueryDto> subOrders = new ArrayList<>();
    /**
     * 信息，分为有物流,和无物流
     */
    private HashMap<String, List<HasLogisticsInfo>> infos = new HashMap<>();
    /**
     * 是否能退款
     */
    private Boolean canRefund;
    /**
     * 是否能修改地址
     */
    private Boolean canModifyAddress;
    /**
     * 客服信息
     */
    private Boolean customerService;
    /**
     * 支付时间
     */
    private Date payTime;
    /**
     * 邮费描述
     */
    private String expressDesc;
    /**
     * 优惠总价 分
     */
    protected Integer discountFee = 0;
    /**
     * 原价费用
     */
    protected Integer originalTotalFee;
    /**
     * 活动券折扣费用
     */
    protected Integer couponDiscountFee;
    /**
     * 活动券个数
     */
    protected Integer couponNum;
    /**
     * 双证补贴费用
     */
    protected Integer subsidyOfDoubleCa;
    /**
     * 附加邮费
     */
    protected Integer extraExpressFee;
    @Getter
    @Setter
    public static class HasLogisticsInfo {
        private List<LogisticsSubOrderQueryDto> itemInfos = new ArrayList<>();
        private Date shippingTime;
        private Integer no;
        /**
         * 物流公司
         */
        private String logisticsCompany;
        /**
         * 物流编号
         */
        private String logisticsNo;
        private String status;
        private String tips;
        private SubscribePushData subscribePushData;
        /**
         * 是否补发
         */
        private Boolean reissue=Boolean.TRUE;
    }
}
